import Vue from 'vue'
import Router from 'vue-router'

import _import from '@/router/_import'
import Layout from '@/views/layout/Layout'

Vue.use(Router)

export const SportRouter = [

    {
        path: '',
        name: '运动主页',
        component: Layout,
        redirect: 'home',
        children: [
            {
                path: 'home',
                component: _import('home/index')
            }
        ]
    },
    {
        path: '/order',
        name: '订单',
        component: Layout,
        redirect: '/order/index',
        children: [
            {
                path: 'index',
                component: _import('order/index')
            }
        ]
    }
    ,
    {
        path: '/shop',
        name: '商城',
        component: Layout,
        redirect: '/shop/index',
        children: [
            {
                path: 'index',
                component: _import('shop/index')
            }
        ]
    }
    ,
    {
        path: '/self',
        name: '我的',
        component: Layout,
        redirect: '/self/index',
        children: [
            {
                path: 'index',
                component: _import('self/index')
            }
        ]
    }

]

export default new Router({
    routes: SportRouter
})
